function updateAccount() {
	if(!verifyInputField("realName,loginName"))
		return ;
if(!checkLoginNameWeak("loginName"))
	return;
var user = {
	id:$("#subAccountId").val(),
	loginName:$("#loginName").val(),
	realName:$("#realName").val()
	};
var loginName = {
	id:$("#subAccountId").val(),
	loginName:$("#loginName").val()
	};	
$.ajax({
	   type: "POST",
	   url: "usercenter/subaccounts/checkSubAccount",
	   dataType:"json",
	   data:JSON.stringify(loginName),
	   contentType:"application/json;charset=UTF-8",
	   success: function(data){
	   		if(data.result == true){
				alertMsg("登录帐号已存在！");
		   		}else{
		   		  $.ajax({
				   type: "POST",
				   url: "usercenter/subaccounts/update",
				   dataType:"json",
				   data:JSON.stringify(user),
				   contentType:"application/json;charset=UTF-8",
				   success: function(data){
				   		if(data.result === true){
				   			var dialog = art.dialog({
											title : '提示',
											content : "修改成功！",
											lock : true,
											drag : false,
											icon : 'succeed',
											ok : function() {
											window.location.href = getRootUrl()+"usercenter/subaccounts/list";
											}
									});
				   		}else{
				   			alertMsg("修改成功，"+data.result+"!");
				   		}
			   	   }
				});
		   		}
   	   }
	});				
}
